{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://leetcode.com/problems/string-matching-in-an-array\n",
    "\n",
    "\n",
    "Runtime: 40 ms, faster than 49.51% of Python3 online submissions for String Matching in an Array.\n",
    "\n",
    "Memory Usage: 14.2 MB, less than 100.00% of Python3 online submissions for String Matching in an Array.\n",
    "\n",
    "\n",
    "```python\n",
    "from itertools import permutations \n",
    "\n",
    "class Solution:\n",
    "    def stringMatching(self, words: List[str]) -> List[str]:\n",
    "        results = []\n",
    "        for a,b in permutations(words, 2):\n",
    "            if a in b:\n",
    "                results.append(a)\n",
    "        return list(set(results))\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
